package com.xiyu.service.repository.medicine;

import com.xiyu.service.model.medicine.HealthMedicinePlanDetail;
import com.xiyu.service.model.medicine.HealthMedicinePlanDetailTable;
import org.babyfish.jimmer.spring.repository.JRepository;

import java.util.Optional;
import java.util.List;

public interface HealthMedicinePlanDetailRepository extends JRepository<HealthMedicinePlanDetail, Long> {
    HealthMedicinePlanDetailTable healthMedicinePlanDetailTable = HealthMedicinePlanDetailTable.$;

    Optional<HealthMedicinePlanDetail> findFirstByPlanIdAndMedicineId(Long planId, Long medicineId);

    List<HealthMedicinePlanDetail> findByPlanId(Long planId);
}